import * as apiService from '@/services/api'

/**
 * 留存率-活跃用户
 * @param params
 * @returns {Promise<*>}
 */
const retentionActiveUserApi = (params) => {
  return apiService.post(api.OPERATIONAL_RETENTION_ACTIVE_USER,
    params);
};
/**
 * 留存率-登陆用户
 * @param params
 * @returns {Promise<*>}
 */
const retentionLoginUserApi = (params) => {
  return apiService.post(api.OPERATIONAL_RETENTION_LOGIN_USER,
    params);
};

/**
 * 转化率-充值
 * @param params
 * @returns {Promise<*>}
 */
const transferRechargeApi = (params) => {
  return apiService.post(api.OPERATIONAL_TRANSFER_RECHARGE,
    params);
};
/**
 * 转化率-投注
 * @param params
 * @returns {Promise<*>}
 */
const transferBettingApi = (params) => {
  return apiService.post(api.OPERATIONAL_TRANSFER_BETTING,
    params);
};
/**
 * 转化率-提现
 * @param params
 * @returns {Promise<*>}
 */
const transferWithdrawApi = (params) => {
  return apiService.post(api.OPERATIONAL_TRANSFER_WITHDRAW,
    params);
};
/**
 * 转化率-优惠
 * @param params
 * @returns {Promise<*>}
 */
const transferPromoApi = (params) => {
  return apiService.post(api.OPERATIONAL_TRANSFER_PROMO,
    params);
};
/**
 * 转化率-登陆
 * @param params
 * @returns {Promise<*>}
 */
const transferLoginApi = (params) => {
  return apiService.post(api.OPERATIONAL_TRANSFER_LOGIN,
    params);
};


/**
 * 注册率
 * @param params
 * @returns {Promise<*>}
 */
const getRegisterRateApi = (params) => {
  return apiService.post(api.OPERATIONAL_USER_REGISTER_RATE,
    params);
};
/**
 * 操作端占比
 * @param params
 * @returns {Promise<*>}
 */
const getPlatformRateApi = (params) => {
  return apiService.post(api.OPERATIONAL_PLATFORM_SUMMARY,
    params);
};
/**
 * 当前在线用户
 * @param params
 * @returns {Promise<*>}
 */
const getOnlineUserApi = (params) => {
  return apiService.post(api.OPERATIONAL_DETAIL_ONLINE,
    params);
};

/**
 * 金流分析
 * @param params
 * @returns {Promise<*>}
 */
const getFinanceAnalyzeApi = (params) => {
  return apiService.post(api.OPERATIONAL_RECHARGE_PAYMENT,
    params);
};

/**
 * 域名检测
 * @param params
 * @returns {Promise<*>}
 */
const getDomainTestInfoApi = (params) => {
  return apiService.post(api.OPERATIONAL_RECHARGE_PAYMENT,
    params);
};
/**
 * 充值提现详情
 * @param params
 * @returns {Promise<*>}
 */
const getRechargeWithdrawDetailApi = (params) => {
  return apiService.post(api.OPERATIONAL_DETAIL_RECHARGE,
    params);
};
/**
 * 新会员数
 * @param params
 * @returns {Promise<*>}
 */
const getNewUserDetailApi = (params) => {
  return apiService.post(api.OPERATIONAL_DETAIL_NEW_USER,
    params);
};
/**
 * 实际上分总额明细
 * @param params
 * @returns {Promise<*>}
 */
const getUpAmountDetailApi = (params) => {
  return apiService.post(api.OPERATIONAL_DETAIL_UP_AMOUNT,
    params);
};
/**
 * 活跃会员数
 * @param params
 * @returns {Promise<*>}
 */
const getActiveUserDetailApi = (params) => {
  return apiService.post(api.OPERATIONAL_DETAIL_ACTIVE_USER,
    params);
};
/**
 * 总流水/有效投注额/会员输赢/投注人数
 * @param params
 * @returns {Promise<*>}
 */
const getBettingDetailApi = (params) => {
  return apiService.post(api.OPERATIONAL_DETAIL_BETTING,
    params);
};
/**
 * 申请优惠人数/总额
 * @param params
 * @returns {Promise<*>}
 */
const getPromoDetailApi = (params) => {
  return apiService.post(api.OPERATIONAL_DETAIL_PROMO,
    params);
};
/**
 * 导出充值提现明细报表
 * @param params
 * @returns {Promise<*>}
 */
const exportRechangeWithdraw = params => {
  return apiService.post(api.RECHARGE_WITHDRAW_EXPORT_LIST, params)
};

/**
 * 导出活跃用户明细报表
 * @param params
 * @returns {Promise<*>}
 */
const exportActiveUser = params => {
  return apiService.post(api.ACTIVE_USER_LIST, params)
};

/**
 * 导出活跃用户明细报表
 * @param params
 * @returns {Promise<*>}
 */
const exportBettingDetail = params => {
  return apiService.post(api.BETTING_DETAIL_LIST, params)
};

/**
 * 导出活跃用户明细报表
 * @param params
 * @returns {Promise<*>}
 */
const exportRegisterRate = params => {
  return apiService.post(api.REGISTER_RATE_LIST, params)
};

/**
 * 导出操作端占比明细报表
 * @param params
 * @returns {Promise<*>}
 */
const exportPlatform = params => {
  return apiService.post(api.PLATFORM_LIST, params)
};

const exportFinanceAnalysis = params => {
  return apiService.post(api.EXPORT_FINANCE_ANALYSIS, params)
};


/**
 * 首次充值明细
 * @param params
 * @returns {Promise<*>}
 */
const getFirstDataApi = (params) => {
  return apiService.get(api.FIRST_DETAIL_DATA,
    params);
};

/**
 * 今日首存数据
 * @param params
 * @returns {Promise<*>}
 */
const getFirstDataDetailApi = (params) => {
  return apiService.get(api.OPERATIONAL_REAL_TIME_FIRST,
    params);
};
export {

  retentionActiveUserApi,//活跃用户留存率
  retentionLoginUserApi,//活跃用户留存率

  transferRechargeApi,//充值转化率
  transferBettingApi,//投注转化率
  transferWithdrawApi,//提现转化率
  transferPromoApi,//优惠转化率
  transferLoginApi,//登陆转化率

  getRegisterRateApi,//注册率
  getPlatformRateApi,
  getOnlineUserApi,

  getFinanceAnalyzeApi,//金流分析
  getDomainTestInfoApi,//金流分析

  getRechargeWithdrawDetailApi,//充值提现明细
  getNewUserDetailApi,//充值提现明细
  getUpAmountDetailApi,//实际上分总额明细
  getActiveUserDetailApi,//充值提现明细
  getBettingDetailApi,//充值提现明细
  getPromoDetailApi,//充值提现明细
  getFirstDataApi,//首次充值明细
  getFirstDataDetailApi,//首存统计

  exportRechangeWithdraw,//导出充值提现明细
  exportActiveUser,//导出活跃用户明细
  exportBettingDetail,//导出投注详情明细
  exportRegisterRate,//导出注册率分析表格
  exportPlatform,//导出操作端占比表格
  exportFinanceAnalysis,//导出金流分析报表
};
